package cn.autumnorange.app.user.provider.rest;

import cn.autumnorange.app.common.dto.ResultDto;
import cn.autumnorange.app.user.api.SysRoleService;
import cn.autumnorange.app.user.api.dto.GramtedAuthorityImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wsf
 * @time 2019/6/7 22:09
 */
@RestController
public class SysRoleRest implements SysRoleService {
  @Autowired private SysRoleService sysRoleService;

  @Override
  public ResponseEntity<ResultDto<List<GramtedAuthorityImpl>>> getRolesByUserId(
      @PathVariable(value = "userId") long userId) {
    return sysRoleService.getRolesByUserId(userId);
  }

  @Override
  public ResultDto<List<GramtedAuthorityImpl>> getRolesById(
      @PathVariable(value = "userId") long userId) {
    return null;
  }
}
